<template>
  <div class="banner">
    <div class="content">
      <div class="logo">
        <nuxt-link to="/"><img src="http://p6dwecco6.bkt.clouddn.com/img/logos.png" alt=""></nuxt-link>
      <span class="secondTirle" v-if="secondPage">{{ msg }}</span>
    </div>
    <div class="search" v-if="!secondPage">
      <div class="search-input">
         <input v-model="searchData" type="text" placeholder="搜索关键词/产品/文章">
          
          <nuxt-link :to="searchrouter"><span>搜索</span></nuxt-link>
      </div>
       
     <p class="search-content">
       <nuxt-link to="/trust">信托资管</nuxt-link>
       <nuxt-link to="/equity">PE</nuxt-link>
       <nuxt-link to="/fund">基金</nuxt-link>
       <nuxt-link to="/product/30">Pre-IPO</nuxt-link>
       <nuxt-link to="/search/投资">投资策略</nuxt-link>
     </p>
     </div>
    <div class="telme"> 
        <div class="teliocn">
            <p> 
                 <span>400-157-0588</span>
            </p>
           <p class="hottel"><span class="el-icon-phone-outline"></span>24小时咨询热线</p>
        </div>
    </div>
    </div>
  </div>
</template>

<script>

export default {
  data(){
      return{
        searchData:"",
        scroll: ''
      }
  },
  props:{
    secondPage:{
      type:Boolean,
      default:false
    },
    msg:{
      type:String,
      default:" "
    }
  },
  computed:{
      searchrouter(){
        return "/search/" + this.searchData
      }
  },
  methods:{
    menu() {
        this.scroll = document.documentElement.scrollTop || document.body.scrollTop;
        // console.log(this.scroll)
      }
  },
  mounted() {
      window.addEventListener('scroll', this.menu)
  }
}
</script>

<!-- Add "scoped" attribute to limit CSS to this component only -->
<style scoped>
.banner {
  width: 100%;
  margin: 0 auto;
  background: #fff;
  overflow: hidden;
}
.content {
  margin: 20px auto 10px;
  width: 1200px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo img {
  display: inline-block;
  vertical-align: middle;
}
.logo span {
  margin-left: 30px;
  font-weight: bolder;
  font-size: 40px;
  color: #cd9c54;
  border-left: 1px solid  #cd9c54;
  padding-left: 10px;
}
.search .search-content {
  margin-top: 10px;
  color: #999;
}
.search .search-content a {
  margin-right: 10px;
}
.search-input {
  border: 3px solid #cd9c54;
  height: 34px;
  width: 390px;
}
.search-input input {
  float: left;
  width: 330px;
  height: 28px;
  line-height: 28px;
  border: none;
  border-right: none;
  padding: 3px 8px;
  color: #b4b4b5;
  vertical-align: middle;
}
.search-input input:focus {
  border: none;
  outline: none;
}
.search-input span {
  cursor: pointer;
  display: inline-block;
  height: 34px;
  width: 44px;
  line-height: 34px;
  background: #cd9c54;
  color: white;
  text-align: center;
}
.telme {
  height: 80px;
  width: 230px;
}
.telme p {
  text-align: right;
}
.telme .hottel {
  font-size: 20px;
  color: black;
  font-weight: 400;
}
.teliocn {
  font-size: 30px;
  font-weight: bolder;
  color: #cd9c54;
}

</style>
